home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / ip / dialupip / dialupip2.0 / doc / install.ms < prev    next >
Encoding:
Text File  |  1991-01-14  |  34.8 KB  |  907 lines

  1. .\" $Header: install.ms,v 2.0 91/01/11 17:12:04 rsalz Exp $
  2. .\"  Copyright (c) 1991 Bolt Beranek and Newman, Inc.
  3. .\"  All rights reserved.
  4. .\"
  5. .\"  Redistribution and use in source and binary forms are permitted
  6. .\"  provided that: (1) source distributions retain this entire copyright
  7. .\"  notice and comment, and (2) distributions including binaries display
  8. .\"  the following acknowledgement:  ``This product includes software
  9. .\"  developed by Bolt Beranek and Newman, Inc. and CREN/CSNET'' in the
  10. .\"  documentation or other materials provided with the distribution and in
  11. .\"  all advertising materials mentioning features or use of this software.
  12. .\"  Neither the name of Bolt Beranek and Newman nor CREN/CSNET may be used
  13. .\"  to endorse or promote products derived from this software without
  14. .\"  specific prior written permission.
  15. .\"
  16. .\"  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
  17. .\"  WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
  18. .\"  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  19. .de XX
  20. .br
  21. .IP "\(rh\ \ \ [\ ]\ \ " 1i
  22. ..
  23. .TL
  24. Installing and Operating Dialup IP 2.0*\*F
  25. .FS
  26. *This paper has been extensively revised for Dialup IP 2.0,
  27. but is based upon Leo Lanzillo's version 1.0 documentation
  28. done while at the CSNET CIC.
  29. .FE
  30. .AU
  31. John Curran
  32. .AI
  33. CSNET Coordination and Information Center
  34. BBN Systems and Technologies
  35. Cambridge, MA  02139
  36. <jcurran@bbn.com>
  37. .AU
  38. Rich Salz
  39. .AI
  40. BBN Systems and Technologies
  41. Cambridge, MA  02139
  42. <rsalz@bbn.com>
  43. .AB
  44. The Dialup IP package is a collection of drivers and support programs that
  45. allow Internet Protocol (IP) traffic over over dynamically-activated
  46. phone connections.
  47. This paper describes a step-by-step installation procedure for the package
  48. and will explain how to configure the software for normal operation.
  49. The topics covered include software installation, configuration,
  50. and troubleshooting.
  51. .AE
  52. .NH 1
  53. Overview
  54. .NH 2
  55. Introduction
  56. .LP
  57. The Dialup IP software runs on Sun 3.5, BSD 4.3, and Ultrix 3.1 operating
  58. systems and uses the system's serial ports to establish IP connections as
  59. needed to other hosts running either Dialup IP or SLIP.
  60. This document is divided into 4 parts.
  61. The Overview section provides background information on the
  62. Dialup IP software including its components and their interrelation.
  63. The subsequent sections cover installation, configuration, and troubleshooting.
  64. In each section, a checklist of steps has been provided for your convenience.
  65. Please resist the urge to work directly from these checklists and
  66. read the entire document before proceeding.
  67. .NH 2
  68. Dialup IP Terminology
  69. .LP
  70. In this document, the following terms will apply:
  71. .IP \fBlocal\ system\fP 15
  72. The system which is running the Dialup IP software at this location.
  73. The local system frequently acts as a gateway for other systems
  74. on the same network.
  75. .IP \fBremote\ system\fP 15
  76. The system being connected to via Dialup IP.
  77. The remote system usually, but not always, is acting as a gateway to the Internet.
  78. .IP \fBdial-out\fP 15
  79. The mode of operation in which the local system automatically 
  80. initiates a connection to the remote system as needed.
  81. .IP \fBdial-in\fP 15
  82. The mode of operation in which the remote system automatically
  83. initiates a connection to the local system when necessary.
  84. .NH 2
  85. Dialup IP Components
  86. .LP
  87. The Dialup IP package is made up of several distinct components:
  88. .IP \fBThe\ dialup\ network\ interface\fP 15
  89. .br
  90. This kernel interface delivers packets to and from the dialup IP software.
  91. It is based upon the SLIP interface, but it has been modified to initiate
  92. connections as needed.
  93. .IP \fBThe\ dialup\ request\ device\fP 15
  94. .br
  95. This device supports a queue of pending connection requests.
  96. The device driver code adds routines to the kernel for opening the device and writing
  97. requests to it.
  98. .IP \fBThe\ diald\ daemon\fP 15
  99. .br
  100. This daemon processes the queued connection requests by acquiring a serial
  101. line and running the appropriate login script for each.
  102. The daemon is started at system initiation from the startup commands and runs
  103. until system shutdown.
  104. .IP \fBThe\ dudisc\ program\fP 15
  105. .br
  106. This program is run by dial-in hosts connecting to the local system.
  107. It sets the line discipline of the tty port to Dialup IP.
  108. .IP \fBThe\ duioctl\ program\fP 15
  109. .br
  110. This command is used to configure the ``\fBdu\fP'' interfaces.
  111. It must be run under
  112. .B root
  113. as it makes device control calls.
  114. .IP \fBThe\ dulogin\ program\fP 15
  115. .br
  116. This program is an optional replacement for the \fIlogin\fP program
  117. which speeds up dial-in connection establishment.
  118. .IP \fBThe\ dialmond\ daemon\fP 15
  119. .br
  120. This daemon collects Dialup IP traffic and usage statistics from the
  121. dialup interfaces and passes it to \fIdialmon\fP for display.
  122. .IP \fBThe\ dialmon\ program\fP 15
  123. .br
  124. This monitor program displays the statistics collect by \fIdialmond\fP.
  125. .NH 2
  126. Dialup IP Organization
  127. .LP
  128. The Dialup IP software is organized in a hierarchical directory structure.
  129. The top level directories are:
  130. .IP \fBsrc\fP 15
  131. This directory contains the source code for the Dialup IP package.
  132. .IP \fBdoc\fP 15
  133. This directory contains the source code for the Dialup IP documentation.
  134. .IP \fBsys\fP 15
  135. This directory contains the source code for the kernel changes necessary
  136. for Dialup IP.
  137. .IP \fBbin\fP 15
  138. This directory contains the Dialup IP binaries.
  139. .IP \fBlog\fP 15
  140. This directory is where the Dialup IP logs are kept.
  141. This includes the overall logs as well as any transaction logs generated.
  142. .IP \fBconfig\fP 15
  143. This directory is where Dialup IP searches for configuration files such
  144. as login scripts and access control files.
  145. .LP
  146. Note that these directories can be split into two trees;
  147. one for software installation with the
  148. \fBsrc\fP, \fBdoc\fP, and \fBsys\fP subdirectories,
  149. and the other for execution with the \fBbin\fP, \fBlog\fP, and \fBconfig\fP
  150. subdirectories.
  151. This is described below under ``Site Preparation.''
  152. .NH 1
  153. Dialup IP Installation
  154. .LP
  155. Installing Dialup IP is relatively straightforward; you prepare for the
  156. installation by loading the distribution media and setting site-specific
  157. parameters.
  158. You then build the kernel code, and finally you build the support code.
  159. .NH 2
  160. Site Preparation
  161. .LP
  162. There are two parameters that must be set prior to installing Dialup IP.
  163. The first is the location of the Dialup IP installation directory, referred
  164. to in this document as DIAL_BUILD.
  165. This is directory where the Dialup IP software will be installed.
  166. The released source specifies \fI/usr/dialupip\fP but this may be changed.
  167. .XX
  168. Decide on the location of the installation directory DIAL_BUILD.
  169. .LP
  170. You should now load the software in the DIAL_BUILD directory.
  171. The package is distributed in \fBtar\fP format.
  172. The full source takes less than a megabyte of space while the installation
  173. will require about three megabytes of disk space as the system is
  174. compiled.  
  175. As distributed, all the files in the Dialup IP distribution are "read-only."  
  176. You should use the \fIchmod\fP(1) command before editing any of them.
  177. Create the DIAL_BUILD directory and extract the software with the following
  178. commands:
  179. .DS
  180. mkdir DIAL_BUILD
  181. cd DIAL_BUILD
  182. tar -xvf \fI<release file>\fP
  183. .DE
  184. This will create the necessary files and directories within DIAL_BUILD.
  185. .XX
  186. Load the distribution tape into directory DIAL_BUILD.
  187. .LP
  188. The second site parameter is the execution directory, referred to as the
  189. DIAL_ROOT directory.
  190. This directory is used as a base for the configuration and
  191. log files and must have \fBbin\fP, \fBconfig\fP, and \fBlog\fP subdirectories.
  192. The released source specifies \fI/usr/dialupip\fP but this may be changed.
  193. .XX
  194. Decide on the location of the execution directory DIAL_ROOT.
  195. .LP
  196. You must change the DIAL_BUILD and DIAL_ROOT parameters in
  197. .I DIAL_BUILD/src/Makefile.inc
  198. and
  199. .I DIAL_BUILD/sys/include/dialup.h
  200. files.  
  201. Edit these files and change the parameters to reflect
  202. your site's configuration.  
  203. .XX
  204. Change the definition of DIAL_BUILD and DIAL_ROOT as needed.
  205. .NH 2
  206. Kernel Installation
  207. .LP
  208. This step modifies several system-wide header files, and hence must be done
  209. prior to installing the support programs.
  210. Prior to starting, you should familiarize yourself with how to configure, build,
  211. and install a new kernel on your system.
  212. Consult your system administrator's guide for more information.
  213. .LP
  214. The Dialup IP kernel code is contained in DIAL_BUILD/src/sys.
  215. Some files are new files which must be added to your kernel's source tree,
  216. and some contain modifications which must be made to existing files.
  217. When modifying a kernel file, save a copy of the original using a new
  218. extension; for example, copy \fI/sys/conf/files\fP to
  219. \fI/sys/conf/files.pre-dip\fP before editing it.
  220. Descriptions of all the files that need to be modified are found in the
  221. directory DIAL_BUILD/sys/kernel_mods.
  222. .LP
  223. The following paragraphs describe the kernel modifications:
  224. .IP 1.
  225. The first step is to tell the \fIconfig\fP procedure about the new
  226. devices.
  227. To do this, add the following lines to \fI/sys/conf/files\fP:
  228. .DS
  229. .ta \w'sys/dialup.c      'u
  230. sys/dialup.c    optional du
  231. net/if_du.c    optional du
  232. .DE
  233. It is not important where in the file these lines are added, but you may want
  234. to group them with lines of a similar format, such as next to other
  235. \fInet/if_\fP lines.
  236. Note that Ultrix has no \fI/sys/sys\fP directory, so use \fInet/dialup.c\fP
  237. instead of \fIsys/dialup.c\fP.
  238. .IP 2.
  239. Copy your current kernel configuration file to \fI/sys/conf/DIALUP\fP.
  240. Edit \fI/sys/conf/DIALUP\fP to add the following line:
  241. .DS
  242. pseudo\-device   du   3
  243. .DE
  244. Again, it is not important where this line appears, but you should probably
  245. put it next to the other pseudo-devices.
  246. The number of devices, shown above as \fI3\fP, represents the number of
  247. Dialup IP interfaces to configure into the kernel.
  248. One interface is allocated for each dialup destination.
  249. Unless you running a major Dialup IP hub, three interfaces should be sufficient.
  250. .IP
  251. Some systems will also require changes to the entries for the serial
  252. devices that are going to be used for Dialup IP.
  253. For example, under Ultrix you should probably edit the \fIflags\fP
  254. word on the \fIdz\fP device to turn \fBoff\fP the control bits for the serial
  255. lines; Dialup IP and \fItip\fP want the modem to properly assert carrier
  256. detect, and not have the system blindly assume it is always on.
  257. On a Sun, it is possible to configure \fIzs\fP devices so that they may be 
  258. used for both dial-in and dial-out connections.
  259. In either case, refer to your relevant system manuals.
  260. .IP 3.
  261. The system configuration file must have pointers to the appropriate
  262. routines to handle the Dialup IP request device, \fI/dev/dialup0\fP.
  263. Change to the \fI/sys/vax\fP directory, or to \fI/sys/sun\fP on a Sun.
  264. Edit \fIconf.c\fP and insert the following lines somewhere before the
  265. declaration of the \fIcdevsw\fP variable:
  266. .DS
  267. /* Dialup IP request device. */
  268. #include "du.h"
  269. .ta \w'#endif   'u
  270. #if    NDU > 0
  271. int dialupopen(), dialupclose(), dialupread(), dialupioctl();
  272. #else
  273. .ta \w'#define dialupclose   'u
  274. #define dialupopen    nodev
  275. #define dialupclose    nodev
  276. #define dialupread    nodev
  277. #define dialupioctl    nodev
  278. .ta \'w#endif   'u
  279. #endif /* NDU > 0 */
  280. .DE
  281. .IP
  282. Next add the routines into the \fIcdevsw\fP dispatch table.
  283. To do this find the variable declaration and move down to the end looking
  284. for the last used number.
  285. Add one to this number to determine the du device number (shown below as
  286. \fI60\fP) and add these lines:
  287. .DS
  288. .ta \w'dialupioctl  'u +\w'dialupclose  'u +\w'dialupread  'u +\w'nodev  'u
  289. {
  290. dialupopen,    dialupclose,    dialupread,    nodev,    /* 60 */
  291. dialupioctl,    nulldev,    nulldev,    0
  292. nodev,    nodev,    0,
  293. }
  294. .DE
  295. Note that on some systems, the exact format of the \fIcdevsw\fP entries
  296. might be different.
  297. The important part is to get the function declarations for the major
  298. routines in the right place, and put null pointers and no-ops to fill
  299. out the entries.
  300. You might want to double-check against your system's \fI<sys/conf.h>\fP
  301. header file.
  302. .IP 4.
  303. Create the request device.
  304. Note the number used in the dispatch table above, and execute the following
  305. commands:
  306. .DS
  307. /etc/mknod /dev/dialup0 c \fI60\fP 0
  308. chmod 400 /dev/dialup0
  309. chown root /dev/dialup0
  310. .DE
  311. .IP 5.
  312. The ``du'' line discipline must be added to the terminal driver.
  313. On Ultrix, change to the \fI/sys/data\fP directory and edit
  314. \fItty_conf_data.c\fP
  315. On a Sun, the file is \fItty_conf.c\fP in the \fI/sys/sys\fP directory.
  316. Look for the \fIlinesw\fP variable, and add the following declarations
  317. before it:
  318. .DS
  319. #include "du.h"
  320. .ta \w'#endif  'u
  321. #if    NDU > 0
  322. int dutopen(), dutclose(), dutinput(), dutioctl(), dutstart(), dutmodem();
  323. #endif    /* NDU > 0*/
  324. .DE
  325. Next add these routines into the dispatch table.  You should use the next available
  326. line discipline number, shown below as \fI8\fP:
  327. .DS
  328. #if    NDU > 0
  329.     dutopen, dutclose, nodev, nodev, dutioctl,
  330.     dutinput, nodev, nulldev, dutstart, dutmodem,    /* \fI8\fP DUDISC */
  331. #else
  332.     nodev, nodev, nodev, nodev, nodev,
  333.     nodev, nodev, nodev, nodev, nodev,
  334. #endif    /* NDU */
  335. .DE
  336. .IP 6.
  337. Next change to the \fI/sys/h\fP directory and edit the \fIioctl.h\fP file.
  338. Look for the definition of line disciplines (such as the #define for
  339. \fINTTYDISC\fP) and add the following line:
  340. .DS
  341. #define DUDISC    \fI8\fP     /* Dialup IP */
  342. .DE
  343. Use the same number that you specified when you edited
  344. the \fIlinesw\fP variable above.
  345. .IP
  346. You also have to add the new ioctl #define's that will be used to
  347. control the devices.
  348. Look for a block of #define's that relate to other interfaces, such as
  349. \fISIOCSIFMETRIC\fP and find the last number in the block.
  350. Assuming it is \fI43\fP, add the following lines after that block:
  351. .DS
  352. /* dialup interface ioctls */
  353. .ta \w'define SIOCGSOFTFLAGS  'u +\w'_IOWR(i,49,struct ifreq)   'u
  354. #define SIOCSATIMEO    _IOWR(i,44,struct ifreq)    /* Set Active timer */
  355. #define SIOCGATIMEO    _IOWR(i,45,struct ifreq)    /* Get Active timer */
  356. #define SIOCSWTIMEO    _IOWR(i,46,struct ifreq)    /* Set Wait timer */
  357. #define SIOCGWTIMEO    _IOWR(i,47,struct ifreq)    /* Get Wait timer */
  358. #define SIOCCLEARQ    _IOWR(i,48,struct ifreq)    /* Clear interf. queue */
  359. #define SIOCSSOFTFLAGS    _IOWR(i,49,struct ifreq)    /* Set soft flags */
  360. #define SIOCGSOFTFLAGS    _IOWR(i,50,struct ifreq)    /* Get soft flags */
  361. #define SIOCSSOFTTIMER    _IOWR(i,51,struct ifreq)    /* Set soft timer */
  362. #define SIOCFAILCALL    _IOWR(i,52,struct ifreq)    /* Mark a failed call */
  363. #define SIOCGIPKTS    _IOWR(i,53,struct ifreq)    /* get input packets */
  364. #define SIOCGOPKTS    _IOWR(i,54,struct ifreq)    /* get output packets */
  365. #define SIOCBRINGUP    _IOWR(i,55,struct ifreq)    /* Bring up interface */
  366. #ifndef SIOCGIFMTU
  367. #define SIOCSIFMTU    _IOW(i, 56, struct ifreq)    /* set if_mtu */
  368. #define SIOCGIFMTU    _IOWR(i,57, struct ifreq)    /* get if_mtu */
  369. #endif /* SIOCGIFMTU */
  370. .DE
  371. The ioctl definitions may have different numbers on your machine.
  372. It is \fBcrucial\fP that unique numbers get assigned!
  373. .IP
  374. On some systems the user directory, \fI/usr/include/sys\fP is linked to the
  375. system directory \fI/sys/h\fP, while on other systems there are two separate
  376. copies.
  377. Verify that the file in \fI/usr/include/sys\fP has the changes you just made,
  378. and if it doesn't, copy the \fIioctl.h\fP file from \fI/sys/h\fP to
  379. \fI/usr/include/sys\fP.
  380. .IP 7.
  381. Copy the Dialup IP drivers into the kernel's source tree:
  382. .DS
  383. cp DIAL_BUILD/sys/sys/dialup.c /sys/sys/.
  384. cp DIAL_BUILD/sys/net/if_du.[ch] /sys/net/.
  385. .DE
  386. Remember that on Ultrix you must use \fI/sys/net\fP instead of \fI/sys/sys\fP.
  387. As you did with the ioctl.h file, make sure that the new file \fI/sys/net/if_du.h\fP
  388. appears in directory \fI/usr/include/net\fP.
  389. Depending on the system, you may need to make a copy or a link.
  390. .IP
  391. Note that \fIif_du.c\fP includes some header files which do not exist on a Sun.
  392. Although they are surrounded by #ifdef's, the Sun ``make depend'' may have
  393. problems and insert false dependencies into the Makefile.
  394. If this happens, edit \fIif_du.c\fP and comment out Vax-specific
  395. #include files.
  396. .XX
  397. Change the kernel files as described above.
  398. .IP 8.
  399. Create a directory for the new kernel, \fI/sys/DIALUP\fP.
  400. This directory will be used to build the Dialup IP kernel.
  401. .DS
  402. mkdir /sys/DIALUP
  403. .DE
  404. .IP 9.
  405. Configure and build a new kernel by using the following commands:
  406. .DS
  407. cd /sys/conf
  408. /etc/config DIALUP
  409. cd /sys/DIALUP
  410. make depend
  411. make
  412. .DE
  413. Save the current kernel and copy \fI/sys/DIALUP/vmunix\fP to \fI/vmunix\fP
  414. and reboot your system.
  415. .XX
  416. Build and install the new kernel.
  417. .NH 2
  418. Support Program Installation
  419. .LP
  420. The support programs, header files, and utility libraries are all located
  421. in DIAL_BUILD\fI/src\fP.
  422. The file DIAL_BUILD\fI/Makefile.inc\fP is an include file used by all the
  423. Makefiles within the \fIsrc\fP directory.
  424. .LP
  425. If the \fImake\fP on your system can't process ``include'' statements,
  426. then the utility \fIfixmake\fP program should be used.
  427. Compile it and run it in each source directory by doing the following:
  428. .DS
  429. cd DIAL_BUILD/src/dulib
  430. cc -o fixmake fixmake.c
  431. cd diald ; ../fixmake ; cd ..
  432. cd dialmon ; ../fixmake ; cd ..
  433. cd dulib ; ../fixmake ; cd ..
  434. cd dumisc ; ../fixmake ; cd ..
  435. .DE
  436. This procedure must be done whenever any \fIMakefile\fP or the file
  437. \fIMakefile.inc\fP changes.
  438. .XX
  439. Run \fIfixmake\fP if necessary.
  440. .LP
  441. The support programs may be installed individually, or may be built all at one time.
  442. If you wish to install all the utilities, you may skip to the ``easy" method listed below.
  443. .LP
  444. If you are going to install each support program manually, 
  445. the utility library must be installed.
  446. To do this, type the following:
  447. .DS
  448. cd DIAL_BUILD/src/lib
  449. make install
  450. make clean
  451. .DE
  452. You can now change to each of the source directories, \fIdiald\fP,
  453. \fIdialmon\fP, and \fIdumisc\fP and do ``make.''
  454. This will build the dialing daemon \fIdiald\fP,
  455. the monitoring programs, and the support programs in turn.
  456. Within each source directory ``make install'' will install the programs
  457. in DIAL_BUILD/bin, ``make lint'' will run \fIlint\fP(1) over the sources,
  458. and ``make clean'' will remove all object files and programs.
  459. If you install the system in pieces this way, you must first do the following:
  460. .DS
  461. cd DIAL_ROOT
  462. mkdir log config bin
  463. cd log
  464. touch call.log dial.log
  465. cd ..
  466. cp DIAL_BUILD/config/* config
  467. .DE
  468. .LP
  469. The ``easy'' way to install all of the support programs
  470. is to change to the \fIsrc\fP directory and just do ``make install'':
  471. .DS
  472. cd DIAL_BUILD/src
  473. make install
  474. make clean
  475. .DE
  476. The top-level Makefile will build the utility library, the directory
  477. structure, and then each of the support programs in turn.
  478. .XX
  479. Build and install the support programs.
  480. .LP
  481. One of the support programs must be setuid root before it will run; the Makefile
  482. tries to do the necessary \fIchown\fP(8) and \fIchmod\fP(1) commands.
  483. If you did not run the \fImake\fP as root, then these commands will
  484. fail (but the \fImake\fP will continue.)
  485. In that case, once the system is compiled and installed, execute the
  486. following commands as root:
  487. .DS
  488. cd DIAL_ROOT/bin
  489. chown root dudisc
  490. chmod 4755 dudisc
  491. .DE
  492. .XX
  493. Make sure that \fIdudisc\fP has the setuid bit set and is owned by root.
  494. .LP
  495. Once the support programs are installed, you should create links to the Dialup IP
  496. login shell, \fIdudisc\fP.
  497. This is done by running the \fIduinstall\fP program.
  498. You will need one link for each system that will have dial-in access to
  499. your system.
  500. If you are running a gateway for many Dialup IP sites, you will have many
  501. du interfaces and many sites calling in.
  502. In most cases there will be one or two sites and one or two devices.
  503. The script prompts for the number of devices that are configured into
  504. the kernel:
  505. .DS
  506. Please enter the number of network devices the kernel
  507. has been generated to hold.  This number must match the value given in
  508. du.h for the constant NDU.
  509.  
  510. How many du network devices to install? \fI3\fP
  511. Linking "/usr/dialupip/bin/dudisc" to "/usr/dialupip/bin/dudisc_dua0"
  512. Linking "/usr/dialupip/bin/dudisc" to "/usr/dialupip/bin/dudisc_dua1"
  513. Linking "/usr/dialupip/bin/dudisc" to "/usr/dialupip/bin/dudisc_dua2"
  514.  
  515. duinstall:  Created 3 network devices.
  516. .DE
  517. .XX
  518. Run duinstall to create the necessary links.
  519. .NH 1
  520. Dialup IP Configuration
  521. .LP
  522. Before you can use Dialup IP, you must perform these basic configuration steps:
  523. preparing the dialup interfaces, configuring the dial-out connections, and
  524. configuring the dial-in connections.
  525. The necesary steps are described in the following sections.
  526. Note that if you do not have any connections of a particular mode (e.g.
  527. dial-in), you may skip that part of the configuration.
  528. There are two additional steps that may be needed at some sites: changing
  529. the IP routing table, and enabling the dialup monitor.
  530. These instructions are also supplied below and may be done once Dialup IP
  531. is running.
  532. .NH 2
  533. Setting up the dialup interfaces
  534. .LP
  535. Connections to remote sites are made via the dialup (``du'') interfaces.
  536. Each interface forms a point-to-point IP connection to a specific remote site.
  537. An interface can be configured to support only dial-in, only dial-out,
  538. or both types of connections.
  539. Before the interfaces can be configured, they must be created via the
  540. \fIduattach\fP command.
  541. This program adds ``du'' interfaces to the system.
  542. The number of interfaces created is specified during Dialup IP installation.
  543. Login or \fIsu\fP(8) to root and run:
  544. .DS
  545. duattach /dev/dialup0
  546. .DE
  547. .LP
  548. After running this command, you should confirm the results by entering
  549. a ``netstat \-i \-n'' command:
  550. .DS
  551. .ta \w'Name  'u +\w'1500  'u +\w'Network  'u +\w'128.89.0.94  'u +\w'27179  'u +\w'Ierrs  'u +\w'Opkts  'u +\w'Oerrs  'u +\w'Collis  'u
  552. Name    Mtu    Network    Address    Ipkts    Ierrs    Opkts    Oerrs    Collis
  553. qe0    1500    128.89    128.89.0.94    27179    0    25210    0    1337
  554. lo0    1536    127    127.0.0.1    2884    0    2884    0    0
  555. dua0*    1006    none    none    0    0    0    0    0
  556. dua1*    1006    none    none    0    0    0    0    0
  557. .DE
  558. You should see one or more ``du'' interfaces.
  559. Note that if you are on a Sun, these interfaces will not show up until after
  560. \fIifconfig\fP has been run in the next step.
  561. .XX
  562. Run duattach to create the network interfaces.
  563. .LP
  564. You should now configure each interface as a point-to-point IP link.
  565. You will need a unique IP address for each end of the link.
  566. For example, CSNET uses network 192.31.242 for its
  567. Dialup IP network and assigns to each site a pair of addresses on this network
  568. to use for their link.
  569. One address is for the host at the site and the
  570. other address is given to the \fIrelay2.cs.net\fP system.
  571. .LP
  572. A site assigned the address 192.31.242.5 would use the following command
  573. to configure their interface to connect to the \fIrelay2.cs.net\fP system
  574. at 192.31.242.6:
  575. .DS
  576. /etc/ifconfig dua0 192.31.242.5 192.31.242.6
  577. .DE
  578. .LP
  579. You should next verify that the interfaces are correctly configured.
  580. The ``netstat \-i \-n'' command should display information similar to the
  581. following:
  582. .DS
  583. .ta \w'Name  'u +\w'1500  'u +\w'192.31.242  'u +\w'192.31.242.5  'u +\w'327179  'u +\w'Ierrs  'u +\w'Opkts  'u +\w'Oerrs  'u +\w'Collis  'u
  584. Name    Mtu    Network    Address    Ipkts    Ierrs    Opkts    Oerrs    Collis
  585. qe0    1500    128.89    128.89.0.94    27179    0    25210    0    1337
  586. lo0    1536    127    127.0.0.1    2884    0    2884    0    0
  587. dua0    1006    192.31.242    192.31.242.5    0    0    0    0    0
  588. dua1*    1006    none    none    0    0    0    0    0
  589. .DE
  590. .XX
  591. Configure each dialup network interface with appropriate IP addresses.
  592. .LP
  593. Once you have determined the correct \fIduattach\fP and \fIifconfig\fP
  594. commands, edit your system start-up scripts (such as \fI/etc/rc.local\fP)
  595. so that these commands are run at boot time.
  596. .XX
  597. Add the interface configuration commands to your system startup file.
  598. .NH 2
  599. Configuring Dial-out Connections
  600. .LP
  601. Dial-out connections are automatically initiated by the \fIdiald\fP daemon
  602. whenever there is a datagram queued for a remote Dialup IP site.
  603. You must have the \fIdiald\fP daemon started at system startup.
  604. Add the following line to the end of your \fI/etc/rc.local\fP file
  605. (substituted the correct value for DIAL_ROOT):
  606. .DS
  607. DIAL_ROOT/bin/diald & (echo -n ' diald') >/dev/console
  608. .DE
  609. \fIDiald\fP reads a configuration file \fI/etc/diald.conf\fP to determine
  610. the remote sites that are connected.
  611. You must create the \fIdiald\fP configuration file as follows:
  612. .DS
  613. touch /etc/diald.conf
  614. chmod 400 /etc/diald.conf
  615. chown root /etc/diald.conf
  616. .DE
  617. .XX
  618. Add \fIdiald\fP to the system startup commands and create the configuration
  619. file.
  620. .LP
  621. For each remote site, you must add an entry to the configuration file.
  622. The format of these entries is documented in \fIdiald.conf\fP(5).
  623. The minimum entry consists of the interface name, the site name,
  624. the tty port to used for dialing out, and the name of script file.
  625. You may also want to place a transaction log in the entry as this will
  626. aid in debugging.
  627. .XX
  628. Add an entry to \fI/etc/diald.conf\fP for each dial-out connection.
  629. .LP
  630. For each remote site, you must also write a script to log on to the remote
  631. system.
  632. The mechanics of making the call are controlled by a scripting language
  633. documented in \fIdiald-script\fP(5).
  634. The script file should be in directory DIAL_ROOT/config and readable by
  635. \fIdiald\fP.
  636. You will find sample script files in the DIAL_ROOT/config directory which
  637. may be copied and modified for your environment.
  638. Note that the script files may be nested and have parameters.
  639. For example, the file \fItb-unix.script\fP calls the \fItb.script\fP script
  640. file to dial out using a Telebit Trailblazer modem,
  641. and then calls \fIunix-login.script\fP to log in to a Unix system.
  642. When specifying the script file field in the \fIdaild.conf\fP,
  643. you may include parameters to be passed to the script.
  644. For example, the following script-file field will call the trailblazer script
  645. with three parameters:
  646. .DS
  647. tb-unix.script 16175551212 yourname yourpass
  648. .DE
  649. .XX
  650. Create the script file for each dial-out connection.
  651. .LP
  652. Once you have the connection working, you may want to add an access control
  653. file.
  654. This file can specify the conditions under which \fIdiald\fP will initiate
  655. a connection.
  656. It is possible to prevent certain systems from initiating requests to
  657. long-distance Dialup IP sites, as well as allowing only higher-level IP
  658. protocols such as TCP to start a connection.
  659. The access-file is the last field in a \fIdiald.conf\fP entry and if not
  660. specified will allow any queued data to initiate the connection regardless
  661. of source, destination, or protocol.
  662. See \fIdiald-access\fP(5) for more information on access controls.
  663. .XX
  664. Add access controls to any dial-out connections needing them.
  665. .NH 2
  666. Configuring Dial-in Connections
  667. .LP
  668. Each site using a dial-in connection must have a username to access the local
  669. system.
  670. The username must be set up in particular manner if Dialup IP is to work
  671. correctly.
  672. Create the entries in \fI/etc/passwd\fP as normal, only specify that the home
  673. directory be DIAL_ROOT and determine the login shell by appending their
  674. interface name to "DIAL_ROOT/bin/dusdisc_".
  675. .LP
  676. For example, a site which connects via interface ``dua3'' should have
  677. DIAL_ROOT/bin/dudisc_dua3 as their login shell.
  678. If the DIAL_ROOT is \fI/usr/dialupip\fP and the site's username ``dialinabc'',
  679. then the complete \fIpasswd\fP entry would be:
  680. .DS
  681. \fIdialinabc:passwd:uid:gid:ABC Dialup IP:/usr/dialupip:/usr/dialupip/bin/dudisc_dua3\fP
  682. .DE
  683. Use values appropriate at your site for the passwd, uid, and gid fields.
  684. .XX
  685. Add a dialup username for each dial-in connection.
  686. .LP
  687. In order for a remote system to log in and start the dialup protocol, you
  688. must have a \fIgetty\fP process running on the serial port that they will be
  689. using.
  690. If a serial port is going to be used only for Dialup IP, then the
  691. \fIdulogin\fP program can be configured on that line to provide faster setup
  692. than the standard \fIlogin\fP(1) program.
  693. If \fIdulogin\fP is used, each dial-in user must also be a member of
  694. the ``dialupip'' group.
  695. For more details, see \fIdulogin\fP(1).
  696. .NH 2
  697. Changing the IP Routing table
  698. .LP
  699. The ``netstat \-r \-n'' command should return information similar to the
  700. following:
  701. .DS
  702. Routing table
  703. .ta \w'192.31.242.6  'u +\w'192.31.242.5  'u +\w'Flags  'u +\w'Refcnt  'u +\w'Use  'u +\w'Interface  'u
  704. Destination    Gateway     Flags    Refcnt    Use    Interface
  705. 127.0.0.1    127.0.0.1    UH    2    28    lo0
  706. 192.31.242.6    192.31.242.5    UH    0    0    dua0
  707. .DE
  708. .LP
  709. This indicates that you may reach host 192.31.242.6 via your ``dua0''
  710. interface.
  711. You can modify this table using the \fIroute\fP(8) command.
  712. You will probably want to add routes for the destinations available via your
  713. dialup IP link.
  714. You can do this for each destination individually or you can set a default
  715. route for all non-local traffic.
  716. Note that the remote system must be configured to forward any non-local
  717. traffic you that send it.
  718. .NH 2
  719. Enabling the Dialup IP monitor
  720. .LP
  721. The Dialup IP package provides a full-screen monitor, \fIdialmon\fP, which
  722. can display various traffic statistics.
  723. Statistics available include cumulative and average line usage measured
  724. in packets and bytes.
  725. A collection program, \fIdialmond\fP, gathers these statistics from the
  726. Dialup IP devices and passes them back to the monitor program via
  727. the tcp service ``dip-status.''
  728. The \fIdialmond\fP program is started by \fIinetd\fP when the monitor
  729. attempts to connect to the ``dip-status'' service.
  730. You must add this new service to the \fI/etc/services\fP file:
  731. .DS
  732. dip-status    190/tcp        # dialmond server
  733. .DE
  734. .LP
  735. You must also add the following line to the \fI/etc/inetd.conf\fP file so
  736. that \fIdialmond\fP will be automatically started:
  737. .DS
  738. dip-status      stream tcp nowait       DIAL_ROOT/bin/dialmond
  739. .DE
  740. You will also have restart or signal your \fIinetd\fP(8) so it will pick up the 
  741. new configuration.  For sites that do not run inetd, the dialdmond program may be 
  742. started from the system startup commands. Refer to \fIdialmond\fP(8) for details.
  743. For more information on the Dialup IP monitor, refer to \fIdialmon\fP(8).
  744. .NH 1
  745. Dialup IP Troubleshooting
  746. .LP
  747. While the Dialup IP package was designed to be easy to use, there are still
  748. numerous problems that can be encountered during normal operation.
  749. This section is an attempt to list the most common problems encountered and
  750. provide some assistance in resolving them.
  751. Also included is a summary of the troubleshooting tools available in
  752. Dialup IP such as log files and utility programs.
  753. .NH 2
  754. Common Problems
  755. .IP Unable\ to\ create\ dialup\ interfaces 10
  756. .br
  757. This occurs when the kernel code has not been installed, when the
  758. \fI/dev/dialup0\fP device has not been created, or if the \fIduttach\fP
  759. command is not run by root.
  760. .IP Dial-out\ modem\ not\ responding 10
  761. .br
  762. This is often a cable problem between the modem and the serial port.
  763. It can also occur if the modem does not perform auto-baud detection and
  764. is not set to the speed listed in \fIdiald.conf\fP.
  765. You should verify proper modem operation by using \fItip\fP(1).
  766. .IP Cannot\ connect\ to\ remote\ system 10
  767. .br
  768. This can be caused by a number of conditions:  no \fIdiald.conf\fP entry
  769. for the interface, no username of the remote system, remote username not
  770. set up correctly, or bad script file.
  771. You should enable a transaction log for this interface and examine the log
  772. for the exact cause.
  773. .IP Dial-in\ connections\ fail 10
  774. .br
  775. The most probable reason is a faulty script file being used at the remote site.
  776. A transaction log (as described above) from the remote system can show this.
  777. If that is not the problem, the the local configuration can be confirmed by
  778. logging in under the assigned username and verifing that it works and
  779. the ``Dialup IP connected'' message is issued.
  780. .NH 2
  781. Tools for Troubleshooting Dialup IP
  782. .IP dial.log 15
  783. This file is in directory DIAL_ROOT/log and records all log messages
  784. relating to Dialup IP connections.
  785. The detail of information recorded about dial-out connections is controlled
  786. by the debug level of the \fIdiald\fP daemon.
  787. The information recorded for dial-in connections is fixed.
  788. This log is the first place to look if there is a problem with Dialup IP.
  789. .IP call.log 15
  790. This file is also in the DIAL_ROOT/log directory, but is used primarily
  791. for accounting purposes.
  792. Each successful dial-out call is recorded along with length and amount of
  793. data transferred.
  794. .IP transction\ logs 15
  795. These logs are created for dial-out connections if specified in the
  796. \fI/etc/diald.conf\fP entry for the interface.
  797. These are very useful for tracking script-file progress.
  798. There are several levels of logging available; see \fIdiald.conf\fP for
  799. more details.
  800. .IP tip(1) 15
  801. This program will connect to a serial port and thus allow easy checkout
  802. of the port, cable, and modem.
  803. You may have to change the tty definition before debugging dial-in ports
  804. since getty cannot be active on the line.
  805. See \fIremote\fP(5) for information on configuring and using tip.
  806. .IP duioctl(8) 15
  807. This program can get and set the timers for a given dialup IP interface,
  808. and can be used to manually initiate dial-out connections for testing.
  809. See \fIduioctl\fP(8) for details.
  810. .bp
  811. .SH
  812. Appendix A:  Upgrading from Earlier Releases
  813. .LP
  814. The configuration file formats for release 2.0 are very different from
  815. the formats used by previous releases.
  816. Most notably, the individual ``\fIhost\fP.conf" files are gone, replaced by
  817. a combination of a single \fI/etc/diald.conf\fP file that gives the main
  818. configuration information, and an optional series of ``\fIdiald\fP.access''
  819. files that provide access control on dialing out.
  820. .LP
  821. In addition, it is now possible to provide parameters when specifying the
  822. dialing script.
  823. This can greatly reduce the number of files that must be maintained while
  824. running Dialup IP.
  825. For example, in prior releases the script file for site abc (\fIabc.conf\fP) would 
  826. contain the line:
  827. .DS
  828. script abc.script
  829. .DE
  830. while \fIabc.script\fP would contain the single line:
  831. .DS
  832. use tb-to-unix.script \fIphonenumber\fP \fIpassword\fP
  833. .DE
  834. This can be replaced by the single ``script-file'' field in the
  835. \fI/etc/diald.conf\fP file.
  836. .DS
  837. tb-to-unix.script \fIphonenumber\fP \fIpassword\fP
  838. .DE
  839. .LP
  840. To help convert the configuration files, a utility program, located in the
  841. \fIdiald\fP source directory, has been provided.
  842. To use it, you must first compile it:
  843. .DS
  844. cd DIAL_BUILD/src/diald
  845. cc -o convert convert.c
  846. .DE
  847. You should then change to your existing configuration directory and do the
  848. following:
  849. .DS
  850. cd /usr/dialupip/config
  851. DIAL_BUILD/src/diald/convert
  852. mkdir SAVE
  853. mv *.conf SAVE
  854. .DE
  855. This will create a sample \fIdiald.conf\fP file for all configured
  856. hosts and template ``diald-access'' files for each interface.
  857. Once you are sure the new files are correct, and after you have made any
  858. other edits (such as removing unneeded script files as described above),
  859. you should move \fIdiald.conf\fP to the \fI/etc\fP directory.
  860. .bp
  861. .SH
  862. Appendix B:  Modem Considerations
  863. .LP
  864. You will want to set your modem so that it does not respond to XON/XOFF,
  865. and so that it will briefly drop Data Set Ready (DSR) when the modem
  866. loses carrier.
  867. The following table shows several sample configurations for various modems:
  868. .DS
  869. \fITrailblazer, Dialout\fP
  870.  
  871. E1 F1 M1 Q0 T V1 X1
  872. S00=001 S01=000 S02=043 S03=013 S04=010 S05=008 S06=002 S07=040 S08=002 S09=006
  873. S10=007 S11=070 S12=050
  874. S45=255 S47=004 S48=001 S49=000
  875. S50=000 S51=004 S52=001 S53=000 S54=003 S55=000 S56=017 S57=019 S58=000 S59=000
  876. S60=000 S61=045 S62=003 S63=001 S64=000 S65=000 S66=001 S67=000 S68=000
  877. S90=000 S91=000 S92=000 S95=000
  878. S100=000 S101=000 S102=000 S104=000
  879. S110=001 S111=255 S112=001
  880. S121=000
  881.  
  882. .DE
  883. .DS
  884. \fITrailblazer, Dial-in\fP
  885.  
  886. E1 F1 M1 Q0 T V1 X1
  887. S00=001 S01=004 S02=043 S03=013 S04=010 S05=008 S06=002 S07=040 S08=002 S09=006
  888. S10=007 S11=070 S12=050
  889. S45=255 S47=004 S48=000 S49=000
  890. S50=000 S51=004 S52=001 S53=004 S54=003 S55=003 S56=017 S57=019 S58=000 S59=000
  891. S60=000 S61=045 S62=003 S63=001 S64=001 S65=000 S66=001 S67=001 S68=000
  892. S90=000 S91=000 S92=000 S95=002
  893. S100=000 S101=000 S102=000 S104=000
  894. S110=255 S111=255 S112=001
  895. S121=000
  896.  
  897. .DE
  898. .DS
  899. \fIMicrocom, Dial-out\fP
  900.  
  901. AT&F
  902. AT&C0
  903. AT%G0
  904. AT&W
  905.  
  906. .DE
  907.